package com.swak.reactivex.transport;

import java.util.concurrent.CompletableFuture;

import com.swak.exception.RemotingException;

public interface ExchangeChannel extends Channel {

	/**
	 * send request.
	 *
	 * @param request
	 * @return response future
	 * @throws RemotingException
	 */
	CompletableFuture<Object> request(Object request) throws RemotingException;

	/**
	 * send request.
	 *
	 * @param request
	 * @param timeout
	 * @return response future
	 * @throws RemotingException
	 */
	CompletableFuture<Object> request(Object request, int timeout) throws RemotingException;
}
